<?php echo $this->Session->flash(); ?>
<script>
    $(document).ready(function(){
        $("#campo_fecha").datepicker({
            yearRange: '1980:2012',
            showOn: 'both',
            buttonImage: './img/calendar.jpg',
            buttonImageOnly: true,
            changeYear: true,
            numberOfMonths: 1
                
        });
    
    });

</script>
<div  id="loadac" style="display: none;">
    <?php echo $html->image('loading.gif', array('border' => "0", 'align' => 'center')); ?>
</div>

<?php echo $form->create('AgriculturalActivities', array('action' => 'add')); ?>
<fieldset><legend>108. ACTIVIDAD AGRICOLA</legend>
    <table>
        <tr>
            <td><?php echo $form->input("AgriculturalActivity.tipo", array('options' => array('' => '', 'Maíz' => 'Maíz', 'Cacao' => 'Cacao', 'Café' => 'Café', 'Plátano' => 'Plátano', 'Yuca' => 'Yuca', 'Frutales' => 'Frutales', 'Forrajeros' => 'Forrajeros', 'Pastos naturales' => 'Pastos naturales', 'Pastos Mejorados' => 'Pastos Mejorados', 'Pastos de corte' => 'Pastos de corte', 'Bosque comercial' => 'Bosque comercial'))); ?></td>
            <td><?php echo $form->input("AgriculturalActivity.tipo_otro"); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input("AgriculturalActivity.area_cultivada"); ?></td>
            <td><?php echo $form->input("AgriculturalActivity.variedad"); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input("AgriculturalActivity.rendimiento"); ?></td>
            <td><?php echo $form->input("AgriculturalActivity.estado_cultivo", array('options' => array('Sin registro' => 'Sin registro', 'Bueno' => 'Bueno', 'Regular' => 'Regular', 'Malo' => 'Malo'))); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input("AgriculturalActivity.fecha_de_siembra", array('id' => 'campo_fecha', 'type' => 'text')); ?></td>
            <td><?php echo $form->input("AgriculturalActivity.sitio_de_venta"); ?></td>
        </tr>
        <tr>
            <td><?php echo $form->input("AgriculturalActivity.a_quien_vende"); ?></td>
            <td><?php echo $form->input("AgriculturalActivity.area_a_explotar"); ?></td>
        </tr>
        <tr>
            <td> <?php echo $form->hidden("AgriculturalActivity.poll_id"); ?></td>
            <td colspan="2"> <?php echo $ajax->submit('Guardar', array('url' => array('controller' => 'AgriculturalActivities', 'action' => 'add', $this->data['AgriculturalActivity']['poll_id']), 'update' => 'agr_activities', 'indicator' => 'loadac')); ?></td>
        </tr>
    </table>
</fieldset>
<?php echo $form->end(); ?>